/*var container = document.getElementById('popup');
var content = document.getElementById('popup-content');
var closer = document.getElementById('popup-closer');

var containerMsg = document.getElementById('popupMsg');
var contentMsg = document.getElementById('popup-contentMsg');
var closerMsg = document.getElementById('popup-closerMsg');

var overlay = new ol.Overlay(*//** @type {olx.OverlayOptions} *//* ({
    element: container,
    autoPan: true,
    autoPanAnimation: {
        duration: 250   //当Popup超出地图边界时，为了Popup全部可见，地图移动的速度. 单位为毫秒（ms）
    }
}));

var overlayMsg = new ol.Overlay(*//** @type {olx.OverlayOptions} *//* ({
    element: containerMsg,
    autoPan: true,
    autoPanAnimation: {
        duration: 250   //当Popup超出地图边界时，为了Popup全部可见，地图移动的速度. 单位为毫秒（ms）
    }
}));*/


map.on('click', function(evt) {
    var pixel = map.getEventPixel(evt.originalEvent);
    var feature = map.forEachFeatureAtPixel(pixel, function(feature, layer) {
        return feature;
    });
    //debugger;
    var coordinate = evt.coordinate;
    var hdms = ol.coordinate.toStringHDMS(ol.proj.transform(
        coordinate, 'EPSG:3857', 'EPSG:4326'));
   	alert("123");
    if(feature!==undefined){    
    	var url=feature.get("url");
       	alert("1333");
                        window.open(url);            
    }
    else{
        //content.innerHTML = '<p>你点击的坐标是：</p><code>' + hdms + '</code><p>这里是大海！</p>';
    }

});

/**
 * 隐藏弹出框的函数
 */
/*closer.onclick = function() {
    overlay.setPosition(undefined);
    closer.blur();
    return false;
};

closerMsg.onclick = function() {
    overlayMsg.setPosition(undefined);
    closerMsg.blur();
    return false;
};*/